'''GET/top250?icn=index-book250-all HTTP/1.1
Host:www.douban.com
User-Agent:curl/7.77.0
Accept:*/*

Username'''
import requests
'''headers = {
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
}
response = requests.get("https://movie.douban.com/top250",headers = headers)
print(response.text)'''
class Dog:
    def __init__(self,name,age):
         self.name=name
         self.age=age
    def cou(self):
        print(self.name)
a = Dog("DP",18)
a.cou()
def tr(a,b='efe f'):
    print(123,b)
tr(1,'213')
with open('C:\python\爬虫\新建 文本文档.txt') as abook:
    for contents in abook:
        print(contents,'hi')
